<load target="filter/insert_wiki.xml" />
<load target="js/wiki_admin.js" />
<include target="header.html" />

<form action="./" method="post" ruleset="insert_wiki" enctype="multipart/form-data" class="form">
	<input type="hidden" name="page" value="{$page}" />
	<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
	<input type="hidden" name="act" value="procWikiAdminInsertWiki" />
	<input type="hidden" name="module" value="wiki" />
	<input type="hidden" name="markup_type" value="{$module_info->markup_type}" cond="$module_info->module_srl" />
    <input type="hidden" name="success_return_url" value="{getUrl('act','dispWikiAdminInsertWiki', 'module_srl', $module_info->module_srl)}" cond="$module_info->module_srl" />
    <input type="hidden" name="success_return_url" value="{getUrl('act','dispWikiAdminContent')}" cond="!$module_info->module_srl" />	
	<div class="table">
		<table cellspacing="0">
			<input type="hidden" name="mid" value="{$module_info->mid}" cond="$logged_info->is_admin!='Y'" />
			<tr cond="$logged_info->is_admin=='Y'">
				<th scope="row">{$lang->mid}</th>
				<td>
					<input type="text" name="mid" value="{$module_info->mid}" class="iText" />
					<p>{$lang->about_mid}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->module_category}</th>
				<td>
					<select name="module_category_srl">
						<option value="0">{$lang->notuse}</option>
						<option loop="$module_category=>$key,$val" value="{$key}" selected="selected"|cond="$module_info->module_category_srl==$key">{$val->title}</option>
					</select>
					<p>{$lang->about_module_category}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->use_comment}</th>
				<td>
					<select name="use_comment">
						<option value="N" selected="selected"|cond="$module_info->use_comment=='N'">{$lang->notuse}</option>
						<option value="Y" selected="selected"|cond="$module_info->use_comment!='N'">{$lang->use}</option>
					</select>
					<p>{$lang->about_use_comment}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->status}</th>
				<td>
					<input type="hidden" name="use_status[]" value="PUBLIC" />
					<input type="checkbox" name="" value="" checked="checked" disabled="disabled" /> {$document_status_list['PUBLIC']}
					<block loop="$document_status_list => $key, $value">
						<block cond="$key != 'PRIVATE' && $key != 'TEMP' && $key != 'PUBLIC'">
							<input type="checkbox" name="use_status[]" id="{$key}" value="{$key}" checked="checked"|cond="@in_array($key, $module_info->use_status) || ($key == 'PUBLIC' && !$module_srl)" /> <label for="{$key}">{$value}</label>
						</block>
					</block>
					<p class="desc">{$lang->about_use_status}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->browser_title}</th>
				<td>
					<input type="text" name="browser_title" value="{htmlspecialchars($module_info->browser_title)}"  class="inputTypeText w400" id="browser_title"/>
					<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','browser_title')}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
					<p>{$lang->about_browser_title}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->markup_type}</th>
				<td>
					<select name="markup_type" <!--@if($module_info->module_srl)-->disabled="disabled"<!--@end-->>
						<option loop="$wiki_markup_list=>$markup" value="{$markup}" selected="selected"|cond="$module_info->markup_type==$markup"><!--@ echo $lang->{$markup}; --><!--@end--></option>
					</select>
					<p>{sprintf($lang->about_markup_type, '<a href="' . getUrl('','module', 'admin', 'act', 'dispWikiAdminMarkupExamples') . '" target="_blank">', '<a/>')}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->layout}</th>
				<td>
					<select name="layout_srl">
						<option value="0">{$lang->notuse}</option>
						<option loop="$layout_list=>$key,$val" value="{$val->layout_srl}" selected="selected"|cond="$module_info->layout_srl==$val->layout_srl">{$val->title}({$val->layout})</option>
					</select>
					<p>{$lang->about_layout}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->skin}</th>
				<td>
					<select name="skin">
						<option loop="$skin_list=>$key,$val" value="{$key}" selected="selected"|cond="$module_info->skin==$key||(!$module_info->skin && $key=='xe_wiki')">{$val->title}</option>
					</select>
					<p>{$lang->about_skin}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->mobile_view}</th>
				<td>
					<input type="checkbox" name="use_mobile" id="use_mobile" value="Y" checked="checked"|cond="$module_info->use_mobile == 'Y'" /><br /><label for="use_mobile">{$lang->about_mobile_view}</label>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->mobile_layout}</th>
				<td>
					<select name="mlayout_srl" id="layout_srl">
							<option value="0">{$lang->notuse}</option>
							<option loop="$mlayout_list => $key, $val" value="{$val->layout_srl}" selected="selected"|cond="$module_info->mlayout_srl== $val->layout_srl">{$val->title} ({$val->layout})</option>
						</select>
					<p>{$lang->about_layout}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->mobile_skin}</th>
				<td>
					<select name="mskin" id="mskin">
						<option loop="$mskin_list=> $key, $val" value="{$key}" selected="selected"|cond="$module_info->mskin== $key || (!$module_info->skin && $key=='xe_wiki')">{$val->title}</option>
					</select>
					<p>{$lang->about_skin}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->description}</th>
				<td>
					<textarea name="description" class="inputTypeTextArea fullWidth">{htmlspecialchars($module_info->description)}</textarea>
					<p>{$lang->about_description}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->header_text}</th>
				<td>
					<textarea name="header_text" class="inputTypeTextArea fullWidth" id="header_text">{htmlspecialchars($module_info->header_text)}</textarea>
					<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','header_text')}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
					<p>{$lang->about_header_text}</p>
				</td>
			</tr>
			<tr>
				<th scope="row">{$lang->footer_text}</th>
				<td>
					<textarea name="footer_text" class="inputTypeTextArea fullWidth" id="footer_text">{htmlspecialchars($module_info->footer_text)}</textarea>
					<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','footer_text')}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
					<p>{$lang->about_footer_text}</p>
				</td>
			</tr>
		</table>
	</div>
	<div class="btnArea">
		<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
	</div>
</form>
